import App from './App'

// #ifndef VUE3
import Vue from 'vue'
import uView from "uview-ui";
import api from 'http/api.js'
import config from 'http/config.js'
import mixin from 'components/mixin.js'
import toast from 'utils/toast/toast.js'
import store from './store'
// import VueI18n from "vue-i18n";

import navBar from './components/navBar/navBar'
import selectAddress from './components/selectAddress/selectAddress'
import selectMenu from './components/selectMenu/selectMenu'
import uploadImg from './components/uploadImg/uploadImg'
import messageBoxa from './components/messageBoxa/messageBoxa'
import hintBox from './components/hintBox/hintBox'
import pullUp from './components/pullUp/pullUp'
import zhButton from '@/components/zhButton/zhButton'
import setPop from '@/components/setPop/setPop'
import agreement from '@/components/agreement/agreement'
import tab from '@/components/tab/tab'
import zhNumberBox from '@/components/zhNumberBox/zhNumberBox'
import searchBox from '@/components/searchBox/searchBox'
import stateMenu from '@/components/stateMenu/stateMenu'
import dataList from '@/components/dataList/dataList'



Vue.config.productionTip = false
App.mpType = 'app'

Vue.use(uView);
Vue.mixin(mixin)
// Vue.use(VueI18n);

Vue.component('navBar', navBar)
Vue.component('selectAddress', selectAddress)
Vue.component('selectMenu', selectMenu)
Vue.component('uploadImg', uploadImg)
Vue.component('messageBoxa', messageBoxa)
Vue.component('hintBox', hintBox)
Vue.component('pullUp', pullUp)
Vue.component('zhButton', zhButton)
Vue.component('setPop', setPop)
Vue.component('agreement', agreement)
Vue.component('tab', tab)
Vue.component('zhNumberBox', zhNumberBox)
Vue.component('searchBox', searchBox)
Vue.component('stateMenu', stateMenu)
Vue.component('dataList', dataList)


Vue.prototype.$api = api
Vue.prototype.$toast = toast
Vue.prototype.$store = store

Vue.prototype.$http = config.url //域名
Vue.prototype.$uploadUrl = config.upload_url //上传文件的url

// 定义挂载文件 使用需要cnpm i vue-i18n
// const i18n = new VueI18n({
// 	// locale: "zh", // 语言标识 //this.$i18n.locale // 通过切换locale的值来实现语言切换
// 	locale: store.state.language,
// 	messages: {
// 		zh: require("utils/vueI18n/zh.js"),
// 		en: require("utils/vueI18n/en.js"),
// 	},
// });

const app = new Vue({
	...App,
	// i18n
})
app.$mount()
// #endif

// #ifdef VUE3
import {
	createSSRApp
} from 'vue'
export function createApp() {
	const app = createSSRApp(App)
	return {
		app
	}
}
// #endif
